

package com.verify.repository;

import com.baomidou.mybatisplus.extension.service.IService;
import com.verify.data.domain.DeterminePost;
import com.verify.data.domain.JobType;
import com.verify.mapper.DeterminePostMapper;
import com.verify.mapper.JobTypeMapper;
import com.verify.repository.base.BaseRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class DeterminePostRepository extends BaseRepository<DeterminePostMapper, DeterminePost>
        implements IService<DeterminePost> {
    public List<DeterminePost> listByOrgCode(String orgCode) {
        return list(baseQuery().eq(DeterminePost::getOrgCode, orgCode));
    }

    public DeterminePost getByName(String name,String orgCode) {
        return getOne(baseQuery().eq(DeterminePost::getPositionName, name).eq(DeterminePost::getOrgCode, orgCode));
    }
}
